import time
from basic.UIParent import UIParent
from basic.utils.asserts import asserts
from commen.page.ann.messagePage import messagePage
from commen.page.ann.myPage import myPage


class MessageCase(UIParent):

    @classmethod
    def test_pMessage(self):
        '''动态个人消息列表校验'''

        # 是否登录
        myPage.loginByStatu()

        messagePage.clickMessage()
        time.sleep(1)
        if  messagePage.ifEmpty() != True:
            lenTitle = messagePage.getTitle()
            asserts.equal(lenTitle > 0, True, "动态个人消息有数据")
        else:
            a = messagePage.ifEmpty()
            asserts.true(a, "动态个人消息无数据")

    """ 
    @classmethod
    def test_cMessage(self):
        '''动态城市消息列表校验'''

        # 是否登录
        pocesuiteDome.test_first()

        messagePage.clickMessage()
        messagePage.clickCity()
        time.sleep(1)

        if messagePage.ifEmpty()!= True:
            lenTitle = messagePage.getTitle()
            asserts.equal(lenTitle, True, "动态城市消息有数据")
        else:
            a = messagePage.ifEmpty()
            asserts.true(a, "动态城市消息无数据")
    """